[PATCH] QOpenGlContext: Always unset current context in doneCurrent()
authorDavid Redondo <qt@david-redondo.de>
Wed, 15 Jan 2025 12:52:13 +0000 (13:52 +0100)
committerPatrick Franz <deltaone@debian.org>
Tue, 2 Sep 2025 19:04:45 +0000 (21:04 +0200)
commitffae813927a6e3807eda981425fc324aedd0eab4
treeca5e7f531a1f6268064bfa4ce0104eef92ab187c
parente027e7a4e49fc422f1b86031b26ee299a89fb8ce
[PATCH] QOpenGlContext: Always unset current context in doneCurrent()

Otherwise when no other context is made current until thread exit, the
QGuiGLThreadContext destructor will try to call doneCurrent() on an
already deleted context.

Change-Id: If55dd69a72b8ab4012780a449f6a02729dd0ed43
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit cd1686e55f706048286cbc962bbe02032c2396cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 10c195b86432eaa430c6991c0fcb74c411407cdf)

Gbp-Pq: Name upstream_unset_current_openglcontext.diff
src/gui/kernel/qopenglcontext.cpp
tests/auto/gui/qopengl/tst_qopengl.cpp